package ly.gupao.edu.designPattern.adapter.objectAdapter;

import ly.gupao.edu.designPattern.adapter.Adaptee;
import ly.gupao.edu.designPattern.adapter.Target;

public class Adapter implements Target{


    /**
     * 适配器中声明类的对象
     */
    public Adaptee adaptee;

    /**
     * 通过适配器的构造方法返回其实例化对象
     * @param adaptee
     */
    Adapter(Adaptee adaptee){
        this.adaptee = adaptee;
    }

    /**
     * 重写接口中的方法
     */
    public void method2() {
        System.out.println("adapter method2 !!!");
    }
}
